package com.qf.entity;

import lombok.Data;

@Data
public class Result {

    private String msg;
    private boolean flag;
    private Object data;

    public static Result success(Object data){
        Result result = new Result();
        result.setData(data);
        result.setMsg("success");
        result.setFlag(true);

        return  result;
    }

    public static Result error(String msg){
        Result result = new Result();
        result.setMsg(msg);
        result.setFlag(false);

        return  result;
    }

}
